package com.consumer.one.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.consumer.one.api.TestApi;

@RestController
public class TestController {

	@Autowired
	private TestApi testApi;
	
    @RequestMapping(value = "/hello.do",method = RequestMethod.GET)
    public String sayHi(@RequestParam String name){
        return testApi.sayHiFromClientOne(name);
    }
    
    @ResponseBody
    @RequestMapping(value = "/hell.do",method = RequestMethod.GET)
    public String sayHello(@RequestParam String name){
        return "hello";
    }
}
